#ifndef CHATSERVER_H
#define CHATSERVER_H

#include "Epoll_Network/include/TcpServer.h"
#include "MsgHandler/include/MsgDecoder.h"
#include "MySqlConnPool/include/sqlsetmanager.h"
#include <string.h>
class ChatServer:public TcpServer
{
public:
    ChatServer(const int port, const uint32_t recvbufmax = 1024, const uint32_t clientmax = 256);

private:
    void haveNewConnection(const int socket) override;
    void haveNewClientMsg(const int socket) override;
    void clientDisconnect(const int socket) override;
    void incompleteMsg(const int socket) override;
    static void dealClient(TcpServer* obj,const int socket,RecvMsg msg);

    void initSqlPool();

};

#endif // CHATSERVER_H
